package blog.controller;

import blog.pojo.ResultVo;
import blog.pojo.User;
import blog.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author HuLin
 * @version 1.0
 * @date 2022/9/16 4:16
 */
@RestController
@RequestMapping("user")
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/login")
    public ResultVo login(@RequestBody User user){
        return userService.login(user);
    }
}
